package com.mmdccj.yugu.service;

import com.github.pagehelper.PageInfo;
import com.mmdccj.yugu.dto.MusicDto;
import com.mmdccj.yugu.dto.MusicListDto;
import com.mmdccj.yugu.dto.PlayDto;
import com.mmdccj.yugu.entity.Music;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: star_
 * @date: 2023-11-22 21:57
 */
public interface MusicService {
    MusicListDto getMusicByMusicList(String musicListId);

    Music getMusicById(String musicId);

    int getMusicNumFromMusicListByMusicListId(String id);

    MusicDto getMusicAndSingerById(String musicId);

    List<Music> getSingerAllMusicById(String userId);

    void updatePlayTimes(String userId, String musicId, String typeId, String type);

    List<PlayDto> getUserWeekPlay(String userId);

    @Transactional
    List<PlayDto> getAllPlay(String userId);

    boolean insertMusic(String userId, Integer duration, String title, String music, String image, String intro, String style);

    List<Music> getUserMusic(String userId);

    void updateMusic(String musicId, Integer duration, String title, String music, String image, String intro, String style);

    List<Music> getUserAllMusicWithoutCD(String userId);

    void deleteSingle(String userId, String musicId);

    PageInfo<MusicDto> getAllMusicDto(int currentPage);

    Integer getAllPlayNums(String userid);

    List<MusicDto> getMostLikeMusic();

    List<MusicDto> getNewMusic();
}
